// eslint-disable-next-line
import { BasicLayout, PageView, UserLayout, RouteView } from '@/layouts'

export const asyncRouterMap = [
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: { title: '首页' },
    redirect: '/home',
    children: [
      // home
      {
        path: '/home',
        name: '_home',
        component: PageView,
        meta: { title: '仪表盘', icon: 'icon-gailan', keepAlive: true },
        children: [
          {
            path: '/home/index',
            name: 'home',
            component: () => import('@/views/home/Index'),
            meta: { title: '首页', keepAlive: false }
          }
        ]
      },
      {
        path: 'problem-attribute-annotation',
        name: '_problemAttributeAnnotation',
        component: PageView,
        meta: { title: '问题属性标注', icon: 'icon-jiami' },
        children: [
          {
            path: '/problem-attribute-annotation-manage',
            name: 'problemAttributeAnnotation',
            component: () => import('@/views/problemAttribute/ProblemAttribute'),
            meta: { title: '问题属性标注', keepAlive: false }
          }
        ]
      },
      {
        path: '/design',
        name: '_design',
        component: RouteView,
        meta: { title: '用户管理', icon: 'icon-yonghuguanli' },
        children: [
          {
            path: '/design/home',
            name: 'users',
            component: () => import('@/views/design/home'),
            meta: { title: '用户管理', keepAlive: false }
          }
        ]
      },
      {
        path: '/agents',
        name: '_agents',
        component: RouteView,
        meta: { title: '角色管理', icon: 'icon-jiaoseguanli' },
        children: [
          {
            path: '/agents/index',
            name: 'agents',
            component: () => import('@/views/recommend'),
            meta: { title: '角色管理', keepAlive: false }
          }
        ]
      },
      {
        path: '/agents3',
        name: '_agents3',
        component: RouteView,
        meta: { title: '授权管理', icon: 'icon-quanxian--xiantiao' },
        children: [
          {
            path: '/agents3/index',
            name: 'agents3',
            component: () => import('@/views/recommend'),
            meta: { title: '授权管理', keepAlive: false }
          }
        ]
      },
      {
        path: '/agents2',
        name: '_agents2',
        component: RouteView,
        meta: { title: '日志审核', icon: 'icon-xitong' },
        children: [
          {
            path: '/agents2/index',
            name: 'agents2',
            component: () => import('@/views/recommend'),
            meta: { title: '日志审核', keepAlive: false }
          }
        ]
      }
    ]
  },
  {
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
      },
      {
        path: 'register',
        name: 'register',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
      }
    ]
  },
  {
    path: '*', redirect: '/404', hidden: true
  },
  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  }
]